package gatperdut.chato.core.messaging.replies;

import gatperdut.chato.core.ChatoServer;
import gatperdut.chato.core.messaging.grammar.messinfo.MessageInfo;
import gatperdut.chato.core.messaging.packagers.ItemTemplatesPackager;
import gatperdut.chato.core.messaging.packagers.ItemsPackager;
import gatperdut.chato.core.messaging.packagers.PlayersPackager;
import gatperdut.chato.core.messaging.packagers.RoomsPackager;

public abstract class Reply {

    private final MessageInfo messageInfo;

    private final ChatoServer chatoServer;

    private final RoomsPackager roomsPackager = new RoomsPackager();

    private final PlayersPackager playersPackager = new PlayersPackager();

    private final ItemTemplatesPackager itemTemplatesPackager = new ItemTemplatesPackager();

    private final ItemsPackager itemsPackager = new ItemsPackager();

    public Reply( MessageInfo messageInfo, ChatoServer chatoServer ) {
        this.messageInfo = messageInfo;
        this.chatoServer = chatoServer;
    }

    public MessageInfo getMessageInfo() {
        return messageInfo;
    }

    public abstract String send();

    public ChatoServer getChatoServer() {
        return chatoServer;
    }

    public RoomsPackager getRoomsPackager() {
        return roomsPackager;
    }

    protected PlayersPackager getPlayersPackager() {
        return playersPackager;
    }

    public ItemTemplatesPackager getItemTemplatesPackager() {
        return itemTemplatesPackager;
    }

    public ItemsPackager getItemsPackager() {
        return itemsPackager;
    }

}
